package com.lsp.data.net;

import rx.Subscriber;

/**
 * @author com.lsp.ibxs
 * @created 16/11/10 15:44
 */
public abstract class UiSubscriber<T> extends Subscriber<T> implements Callback<T>{

  @Override public void onCompleted() {
    onEnd();
  }

  @Override public void onError(Throwable e) {
    onHttpError(new HttpError(e.getMessage()));
  }

  @Override public void onNext(T o) {
    //if(returnCode == "login"){
    //  onVerifyError();
    //}else if(returnCode !=200){
    //  onApiError(new ApiError(returnCoe,message));
    //}else{
      onSuccess(o);
    //}
  }

}
